#define _CRT_SECURE_NO_WARNINGS 1
#include"HeapSort.h"

void JumpDown(int* arr, int n, int parent)
{
	assert(arr);
	int child = parent * 2 + 1;
	while (child < n)
	{
		if (child + 1 < n && arr[child] < arr[child + 1])
		{
			child = child + 1;
		}
		if (arr[parent] < arr[child])
		{
			int tmp = arr[parent];
			arr[parent] = arr[child];
			arr[child] = tmp;

			parent = child;
			child = parent * 2 + 1;
		}
		else
		{
			break;
		}
	}

}


void JumpUp(int* arr, int n)
{
	
	
}

